/* 滚动条 */
.scrollbar, .sider-scrollbar {
    overflow: auto;
    scrollbar-width: thin !important;
    scrollbar-color: rgb(227,227,227) transparent;
}

[data-theme = 'dark'] {
    .scrollbar, .sider-scrollbar {
        scrollbar-color: rgb(66,66,66) transparent;
    }
}

[sider-dark = 'dark'] {
    .sider-scrollbar {
        scrollbar-color: rgb(66,66,66) transparent;
    }
}

/**
    单行 form-item 下 label margin设置为0
 */
.form-item-single-line {
    margin: 0;
}

/**
    ant 官方 tree-select 组件长度默认很短，定义css与其他input框默认长度对齐
 */
.default-input-width {
    width: 196px !important
}

/**
    下拉菜单毛玻璃效果
 */
.drop-down-glass {
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background: rgba(255,255,255,0);
    border-radius:8px
}

/**
    根据主题颜色改变图标颜色
 */
.icon-default-color {
    color: rgba(0, 0, 0, 0.88);
}

.input-prefix-icon-color {
    color: rgba(0,0,0,0.25);
}

.danger-color {
    color: #ff4d4f;
}

[data-theme = 'dark'] {
    .icon-default-color {
        color:  rgba(255, 255, 255, 0.85);
    }
    .input-prefix-icon-color {
        color: rgba(255,255,255,0.25);
    }
    .danger-color {
        color: #dc4446;
    }
}
[sider-dark = 'dark'][layout-type = 'top-navigation'],
[sider-dark = 'dark'][layout-type = 'mix-navigation'][enable-mix-split-menu='active'] {
    .icon-default-color {
        color: rgba(255, 255, 255, 0.65);
    }
    .text-default-color {
        color: rgba(255, 255, 255, 0.65);
    }

    .icon-default-color:hover {
        color: rgba(255, 255, 255, 1);
    }
    .text-default-color:hover {
        color: rgba(255, 255, 255, 1);
    }
}
/**
    顶部导航模式下，使用该css可使内容居中
 */
[layout-type='top-navigation'] {
    .top-navigation-center {
        max-width: 1400px;
        margin: auto
    }
}

/**
    暗色模式半透明蒙版，降低亮度
 */
[data-theme = 'dark'] {
    .dark-overlay::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.2); /* 黑色半透明蒙版，透明度50% */
        z-index: 1; /* 保证蒙版在内容之上 */
        pointer-events: none; /* 允许点击穿透蒙版 */
    }
}

/**
    灰色模式 由管理员统一开启
 */
[enable-gray-model = 'active'] {
    body {
        -webkit-filter: grayscale(100%);
        -moz-filter: grayscale(100%);
        -o-filter: grayscale(100%);
        filter: grayscale(100%);
        filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
    }
}

/**
    文本不可选中
 */
.unselectable {
    -webkit-user-select: none; /* Safari 3.1+ */
    -moz-user-select: none; /* Firefox 2+ */
    -ms-user-select: none; /* IE 10+ */
    user-select: none; /* Standard syntax */
}

/**
    鼠标悬停变为手指
 */
.hover-cursor-pointer {
    cursor: pointer
}
